/*
 * @Author: your name
 * @Date: 2020-08-26 15:22:31
 * @LastEditTime: 2020-08-26 15:24:49
 * @LastEditors: your name
 * @Description: In User Settings Edit
 * @FilePath: /decorator/src/demo.ts
 */
const userInfo: any = undefined;
function catchError(msg: string) {
  return function(target:any, key: string, desciptor: PropertyDescriptor) {
    const fn = desciptor.value;
    desciptor.value = function () {
      try {
        fn();
      }catch (e) {
        console.log(msg);
      }
    }
  }
}
